import request from '@/utils/request'

// 查询我的收藏列表
export function listFavorites(query) {
  return request({
    url: '/shop/favorites/list',
    method: 'get',
    params: query
  })
}

//根据店铺id查询是否在我的收藏列表中
export function getFavoritesByPropertyId(propertyId) {
  return request({
    url: '/shop/favorites/query/'+propertyId,
    method: 'get'
  })
}

// 查询我的收藏详细
export function getFavorites(favoriteId) {
  return request({
    url: '/shop/favorites/' + favoriteId,
    method: 'get'
  })
}

// 新增我的收藏
export function addFavorites(data) {
  return request({
    url: '/shop/favorites',
    method: 'post',
    data: data
  })
}

// 修改我的收藏
export function updateFavorites(data) {
  return request({
    url: '/shop/favorites',
    method: 'put',
    data: data
  })
}

// 删除我的收藏
export function delFavorites(favoriteId) {
  return request({
    url: '/shop/favorites/' + favoriteId,
    method: 'delete'
  })
}
